package com.atguigu.gmall.publisher.mapper;

import com.atguigu.gmall.publisher.beans.ProvinceStats;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 地区统计Mapper
 *
 * @author lvbingbing
 * @date 2022-07-07 11:13
 */
public interface ProvinceStatsMapper {

    @Select(" select " +
            " province_id, " +
            " province_name, " +
            " sum(order_amount) as order_amount " +
            " from province_stats_2021 " +
            " where toYYYYMMDD(stt)=#{date} " +
            " group by province_id, province_name ")
    List<ProvinceStats> selectProvinceStats(Integer date);

}
